<?php $this->load->view('header');?>
<section id="slider_sec"><!-- Slider section -->
		<div class="wrapper"><!-- 900px wrapper -->
            
        <div id="slider_window"><!-- Slider window -->
            <div class="slider-wrapper theme-default">
                <div class="ribbon"></div>
                <div id="slider" class="nivoSlider">
					<?php foreach ($sliders as $slider){ ?>
						<img src="<?php echo base_url()."images/slider/".$slider['foto'];?>" alt="" title="<?php echo $slider['deskripsi'];?>" />
					<?php } ?>
                </div>
                <div id="htmlcaption" class="nivo-html-caption">
                    <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
                </div>
            </div>
        </div>    
            
        </div> <!-- 900px wrapper -->
        <div id="slider_background"></div><!-- Slider Background (grey line behing) -->
        </section>
        
        <div class="wrapper"><!-- 900px wrapper -->
        
        <ul id="slogan"><!-- Slogans under slider -->
        	<li>&ldquo;Dharmaksatria.&rdquo;</li>
            <li>Berbeda-beda tetapi satu tujuan.</li>
            <li>Dharmaksatria pasti Bisa!.</li>
        </ul>
        
        </div><!-- 900px wrapper -->
	</div>
    
    <div id="content"><!-- Very main section for content (everything between header and footer!) -->
    <div class="wrapper_content"><!-- 900px wrapper -->
        <article>
            <h1>Artikel Terbaru</h1>
        </article>
		<?php foreach($articles as $article){ ?>
			<article class="quarter"><!-- Articles (each one) -->
				<div style="height:48px; display:block;"><img src="<?php echo base_url()."images/article_images/".$article['foto'];?>" alt="<?php echo $article['judul'];?>" style="max-width: 48px; max-height:48px; float:left;margin-right:10px;" />
				<h2><?php echo $article['judul']; ?></h2></div>
				<div class="cleaner"></div>
				<p><?php echo substr($article['isi'], 0, 264);?></p>
				<a href="<?php echo base_url()."articles/detail/".$article['id_artikel'];?>" class="learn_more">Selengkapnya&nbsp;&raquo;</a>
			</article>
		<? } ?>
		<div class="cleaner"></div>
		
		<article>
            <h1>Foto Terbaru</h1>
        </article>
		<?php foreach($photos as $photo){ ?>
			<article class="quarter photo">
				<a href="<?php echo base_url()."photos/detail/".$photo['foto'];?>"><img class="photo-img" src="<?php echo base_url() . PHOTO_PATH . $photo['foto'];?>" /></a>
				<h2 class="caps"><?php echo $photo['judul'];?></h2><span class="writer">Diunggah Oleh: <?php echo $photo['writer'];?></span>
				<p class="cek">Pada <?php echo timestamp_to_date_time($photo['waktu_posting']); ?></p>
			</article>
		<? } ?>
		
		<article>
            <h1>Video Terbaru</h1>
        </article>
		<?php foreach($videos as $video){ ?>
			<article class="quarter photo">
				<a href="<?php echo base_url()."videos/detail/".$video['id_video'];?>"><?php echo get_thumbnail($video['url'], 195);?></a>
				<h2 class="caps"><?php echo $video['judul'];?></h2><span class="writer">Diunggah Oleh: <?php echo $video['username'];?></span>
				<p class="cek">Pada <?php echo timestamp_to_date_time($video['waktu_posting']); ?></p>
			</article>
		<? } ?>
		
	<div class="cleaner"></div><!-- Float cleaner, just in case of flaoting issues) -->
    </div>
    </div>
    <div class="cleaner"></div>
    
    <div id="twitter_bar"><!-- Twitter Bar -->
    <div class="wrapper"><!-- 900px wrapper -->
    
    	<img src="<?php echo base_url();?>images/twitter_icon.png" alt="Twitter Icon" />
        <span id="twitter_sep_line"></span>
        <p id="twitter_tweet"><a class="highlight">Dharmaksatria</a>: Website Alumni Kepolisian Tahun 2010. Ayo para alumni <a href="<?php echo base_url()."beranda/register";?>" class="highlight">gabung</a> bersama kami!</p>

	</div><!-- 900px wrapper -->
    </div>
    <?php $this->load->view('footer', $footer);?>
</body>
</html>